﻿Imports DTO


Public Class KeSach_DAO
    Public Shared Function loadKeSach() As List(Of KeSach_DTO)
        Dim dt As DataTable = DataProvider.loadDataTable("select *from kesach")
        Dim ds As New List(Of KeSach_DTO)


        For Each r As DataRow In dt.Rows
            Dim ks As New KeSach_DTO
            ks.maKe = r(0)
            ks.tenKe = r(1).ToString
            ks.soNgan = r(2)
            ks.soTang = r(3)
            ds.Add(ks)
        Next

        Return ds
    End Function
End Class
